<template>
  <div>
    <h1>News</h1>
    <ul>
      <li v-for="item in List" :key="item">{{item}}</li>
    </ul>
  </div>
</template>

<script>
export default {
    name:"News",
    computed:{
      List(){
         if (this.$route.params.id===1) {
          return ["易烊千玺进话剧院","佩洛西降落台湾","银行垫付存款"]
        } else if (this.$route.params.id===2) {
          return ["俄罗斯打不过乌克兰","特朗普再次竞选","bbc谈台湾问题"]
        } else return ""
      }
    }
};
</script>

<style></style>
